_sslutil__avoid_deprecation_warnings_from_python_3_10_s_ssl_module
authorDebian Python Team <team+python@tracker.debian.org>
Mon, 23 May 2022 10:21:07 +0000 (11:21 +0100)
committerJulien Cristau <jcristau@debian.org>
Mon, 23 May 2022 10:21:07 +0000 (11:21 +0100)
commitf46bb7be38baa2171841021b8b605bdbc96ad0c6
tree6bd0112d934e26c1b126cd0c8e3af92953c49016
parenta47cd2b7d5a428319d4e97d8827f8f4250a00ab7
_sslutil__avoid_deprecation_warnings_from_python_3_10_s_ssl_module

# HG changeset patch
# User Julien Cristau <jcristau@debian.org>
# Date 1649506532 -7200
#      Sat Apr 09 14:15:32 2022 +0200
# Node ID 410916fc5935c7855c2cf4876d8311d34aabc29a
# Parent  96cc0ab5e1e68e4e163e8933842f908dcf42897a
sslutil: avoid deprecation warnings from python 3.10's ssl module

Use ssl.PROTOCOL_TLS_{CLIENT,SERVER} and
SSLContext.{min,max}imum_version when supported (3.7+).

And, catch deprecation warnings when the user asks for deprecated TLS
versions (1.0 and 1.1).

Differential Revision: https://phab.mercurial-scm.org/D12488

Gbp-Pq: Topic py310
Gbp-Pq: Name 3_sslutil__avoid_deprecation_warnings_from_python_3_10_s_ssl_module.patch
mercurial/sslutil.py